---@class AttackUtils
AttackUtils = ClientFight.CreateClass("AttackUtils")
local this = AttackUtils
---计算技能伤害
---@param skill FightUsingSkill
---@param target Fighter
---@return FightResult
function this.calculateSkillDamage(skill, target)
    local fighter = skill.fighter
    local fight = fighter.fight
    local skillBean = skill.skill.skillBean
    local isNormalAttack = skillBean.f_SkillType == SkillTypeEnum.NORMAL_ATTACK
    local damageType = skillBean.f_HurtMethod
    local calculateAttrType = skillBean.f_TriggerFigthHurt
    local modifiedRatio = skillBean.f_HurtCorrectFactor ~= nil and skillBean.f_HurtCorrectFactor[1] or 10000;
    local bonus = skillBean.f_HurtBase ~= nil and skillBean.F_HurtBase[1] or 0;
    local addHurtCorrectFactor = math.floor(skill.parameters[FightUsingSkill.HurtCorrectFactor] or 0);
    modifiedRatio = modifiedRatio + addHurtCorrectFactor;

    local skillHurtCorrectMap = fighter.parametersByObject[FightUsingSkill.HurtCorrectFactor] or {};
    modifiedRatio = modifiedRatio + (skillHurtCorrectMap[1] or 0);
    modifiedRatio = modifiedRatio + (skillHurtCorrectMap[skill.skill.skillBean.f_SkillID] or 0);

    ---@type FightResult
    local result = FightResult.New()
    result:setState(DamageResultTypeEnum.NORMAL)

    if (isNormalAttack and FighterStateEnum.is(fighter, FighterStateEnum.BLIND_NORMAL_ATTACK)) then
        --//普攻致盲
        result:setState(DamageResultTypeEnum.DODGE)
        --fight.log("技能伤害计算:{}的技能{}因为普攻致盲而被闪避", fighter.fighterId, skill.skill.skillBean.f_SkillID);
        return result;
    end
    if (not isNormalAttack and FighterStateEnum.is(fighter, FighterStateEnum.BLIND_SKILL_ATTACK)) then
        --技能致盲
        result:setState(DamageResultTypeEnum.DODGE)
        --fight.log("技能伤害计算:{}的技能{}因为技能致盲而被闪避", fighter.fighterId, skill.skill.skillBean.f_SkillID);
        return result;
    end

    if (FighterStateEnum.is(target, FighterStateEnum.IMMUNITY)) then
        result:setState(DamageResultTypeEnum.IMMUNITY)
        --fight.log("技能伤害计算:{}的技能{}因为免疫全部伤害而被免疫", fighter.fighterId, skill.skill.skillBean.f_SkillID);
        return result;
    end
    if (skillBean.f_BulletTpye == 1) then
        if (FighterStateEnum.is(target, FighterStateEnum.IMMUNITY_BALLISTIC)) then
            result:setState(DamageResultTypeEnum.IMMUNITY)
            --fight.log("技能伤害计算:{}的技能{}因为免疫弹道伤害而被免疫", fighter.fighterId, skill.skill.skillBean.f_SkillID);
            return result;
        end
    end

    if (damageType == SkillDamageTypeEnum.PHYSICS) then
        if (FighterStateEnum.is(target, FighterStateEnum.IMMUNITY_PHYSICAL_DAMAGE)) then
            result:setState(DamageResultTypeEnum.IMMUNITY)
            --fight.log("技能伤害计算:{}的技能{}因为免疫物理伤害而被免疫", fighter.fighterId, skill.skill.skillBean.f_SkillID);
            return result;
        end
    end
    if (damageType == SkillDamageTypeEnum.MAGIC) then
        if (FighterStateEnum.is(target, FighterStateEnum.IMMUNITY_MAGIC_DAMAGE)) then
            result:setState(DamageResultTypeEnum.IMMUNITY)
            --fight.log("技能伤害计算:{}的技能{}因为免疫魔法伤害而被免疫", fighter.fighterId, skill.skill.skillBean.f_SkillID);
            return result;
        end
    end
    --// 只有普通攻击才计算闪避
    if (isNormalAttack) then
        if (damageType == SkillDamageTypeEnum.PHYSICS or damageType == SkillDamageTypeEnum.MAGIC) then
            if (not Formulas.calculateNormalAttackHitrate(fighter, target)) then
                result:setState(DamageResultTypeEnum.DODGE)
                --fight.log("技能伤害计算:{}的技能{}被闪避", fighter.fighterId, skill.skill.skillBean.f_SkillID);
                return result;
            end
        end
    end

    local atk = Formulas.calculateAtkAttr(fighter, target, calculateAttrType, false);
    --fight.log("技能伤害计算：攻击值{atk:{}}", atk);
    if (atk <= 0) then
        return result;
    end

    local def = FighterAttributeManager.getFightAttr(target, FighterAttributeEnum.DEF);
    local ignoreDefRatio = FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.IGNORE_DEF);
    def = def - calcRatio(def, math.floor(ignoreDefRatio));
    --fight.log("技能伤害计算：防御值{def:{}}", def);
    if (def < 0) then
        def = 0;
    end

    -- 神圣攻击无视防御
    if (damageType == SkillDamageTypeEnum.HOLY) then
        def = 0
        --fight.log("技能伤害计算：神圣攻击无视防御{def:{}}", def);
    end

    local damage = atk - def;
    --fight.log("技能伤害计算：攻击减防御{damage:{}}", damage);

    -- 下限修正
    local minAtk = calcRatio(atk, Global.DAMAGE_MIN);
    if (damage < minAtk) then
        damage = minAtk;
        --fight.log("技能伤害计算：下限修正{damage:{}}", damage);
    end
    -- 减伤修正
    local reduceDamageRatio = Formulas.calculateReduceDamageRatio(fighter, target, damageType);
    if (reduceDamageRatio > 0) then
        damage = damage * (1 - Utils.toRatio(reduceDamageRatio))
        --fight.log("技能伤害计算：减伤修正{damage:{},reduceDamageRatio:{}}", damage, reduceDamageRatio);
    end
    -- 暴击修正
    -- 普通攻击无法暴击
    if (isNormalAttack and fighter.totalSign.signs[FighterSignEnum.NORMAL_NO_CRIT]) then
        --fight.log("技能伤害计算：标记{普攻无法暴击}");
    elseif (fighter.totalSign.signs[FighterSignEnum.NO_CRIT]) then
        --fight.log("技能伤害计算：标记{攻击时无法暴击}");
    elseif (table.contains(skillBean.f_SkillLabel, SkillLabelType.NOT_CRIT)) then
        --fight.log("技能伤害计算：技能标签{无法暴击}");
    else
        local critDamageRatio = Formulas.calculateCritDamageRatio(fighter, target, damageType);
        if (critDamageRatio > 0) then
            result:setState(DamageResultTypeEnum.CRIT);
            damage = damage * Utils.toRatio(critDamageRatio);
            --fight.log("技能伤害计算：暴击修正{damage:{},critDamageRatio:{}}", damage, critDamageRatio);
        end
    end
    -- 等级压制修正
    local levelSuppressRatio = Formulas.calculateLevelSuppressRatio(fighter, target);
    if (levelSuppressRatio > 0) then
        damage = damage * levelSuppressRatio;
        --fight.log("技能伤害计算：等级压制修正{damage:{},levelSuppressRatio:{}}", damage, levelSuppressRatio);
    end
    --比例修正
    if (modifiedRatio > 0) then
        damage = damage * Utils.toRatio(modifiedRatio);
        --fight.log("技能伤害计算：比例修正{damage:{},modifiedRatio:{}} , 其中,额外比例系数加成 {}", damage, modifiedRatio,addHurtCorrectFactor);
    end

    --额外修正
    if (bonus > 0) then
        damage = damage + bonus;
        --fight.log("技能伤害计算：额外修正{damage:{},bonus:{}}", damage, bonus);
    end
    -- 克制修正
    if (fighter.heroBean.f_HeroType > HeroConst.Hero_Type_NONE) then
        local oppress = Global.HERO_CLASS_OPPRESS[fighter.heroBean.f_HeroType];
        if (target.heroBean.f_HeroType == oppress[1]) then
            damage = damage * Utils.toRatio(oppress[2])
            --fight.log("技能伤害计算：克制修正{damage:{},bonus:{}}", damage, oppress[1]);
        end
    end
    --伤害加成
    local damageAddition = FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.DAMAGE);
    local addDamageAddition = math.floor(damage * Utils.toRatio(damageAddition))
    damage = damage + addDamageAddition;
    --fight.log("技能伤害计算：伤害加成{damage:{},addDamageAddition:{}}", damage, addDamageAddition);

    local MIN_DAMAGE_FLOAT = math.floor(FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.MIN_DAMAGE_FLOAT))
    local MAX_DAMAGE_FLOAT = math.floor(FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.MAX_DAMAGE_FLOAT))
    if (MIN_DAMAGE_FLOAT == MAX_DAMAGE_FLOAT) then
        result:setDamage(math.floor(damage));
        return result;
    end
    if (MAX_DAMAGE_FLOAT < MIN_DAMAGE_FLOAT) then
        local tempMin = MIN_DAMAGE_FLOAT;
        MIN_DAMAGE_FLOAT = MAX_DAMAGE_FLOAT;
        MAX_DAMAGE_FLOAT = tempMin;
    end
    local randomDAMAGE_FLOAT = math.random(MIN_DAMAGE_FLOAT, MAX_DAMAGE_FLOAT + 1)
    damage = damage * MathUtil.toRatio(randomDAMAGE_FLOAT);
    damage = this.shiAdjust(damage, fighter, target);
    result:setDamage(math.floor(damage));
    return result
end
---计算技能治疗
---@param skill FightUsingSkill
---@param target Fighter
---@return FightResult
function this.calculateSkillHeal(skill, target)
    local skillEffect = SkillManager.getSkillEffect(skill.skill.skillBean.f_SkillScript);
    if (skillEffect ~= nil) then
        local result = skillEffect:calculateSkillHeal(skill, target);
        if (result ~= nil) then
            return result;
        end
    end

    local fighter = skill.fighter
    local fight = fighter.fight
    local skillBean = skill.skill.skillBean
    local calculateAttrType = skillBean.f_TriggerFigthHurt
    local modifiedRatio = skillBean.f_HurtCorrectFactor ~= nil and skillBean.f_HurtCorrectFactor[1] or 10000
    local bonus = skillBean.f_HurtBase ~= nil and skillBean.f_HurtBase[1] or 0

    --fight.log("技能治疗计算：开始{calculateAttrType:{},modifiedRatio:{}},{}---vs---{}", calculateAttrType, modifiedRatio, fighter:printAttr(), target:printAttr());

    ---@type FightResult
    local result = FightResult.New()
    result:setState(DamageResultTypeEnum.HEAL);

    local atk = Formulas.calculateAtkAttr(fighter, target, calculateAttrType, true);
    --fight.log("技能治疗计算：攻击值{atk:{}}", atk);
    if (atk <= 0) then
        return result;
    end

    local cure = FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.CURE);
    local curePer = FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.CURE_PER);

    local heal = atk * cure * Utils.toRatio(curePer);
    --fight.log("技能治疗计算：治疗值{heal:{}}", heal);

    -- 比例修正
    if (modifiedRatio > 0) then
        heal = heal * Utils.toRatio(modifiedRatio);
        --fight.log("技能治疗计算：比例修正{heal:{},modifiedRatio:{}}", heal, modifiedRatio);
    end
    -- 额外修正
    if (bonus > 0) then
        heal = heal + bonus;
        --fight.log("技能治疗计算：额外修正{heal:{},bonus:{}}", heal, bonus);
    end
    --治疗效果
    local cureEffect = FighterAttributeManager.getFightAttr(target, FighterAttributeEnum.CURE_EFFECT);
    if (cureEffect < -10000) then
        cureEffect = -10000;
    end
    --fight.log("技能治疗计算：治疗效果{heal:{},cureEffect:{}}", heal, cureEffect);
    local cureEffectAdd = heal * cureEffect / 10000;
    heal = heal + cureEffectAdd;
    result:setDamage(math.floor(heal))
    return result
end
---计算效果伤害
---@param fighter Fighter
---@param target Fighter
---@param calculator Fighter
---@return FightResult
function this.calculateEffectDamage(fighter, target, damageType, calculator, calculateAttrType, modifiedRatio, bonus)
    local fight = fighter.fight
    --fight.log("效果伤害计算：开始{damageType:{},calculateAttrType:{},modifiedRatio:{}},{}---vs---{}", damageType, calculateAttrType, modifiedRatio, fighter:printAttr(), target:printAttr());
    ---@type FightResult
    local result = FightResult.New();
    result:setState(DamageResultTypeEnum.NORMAL);
    if (FighterStateEnum.is(target, FighterStateEnum.IMMUNITY)) then
        result:setState(DamageResultTypeEnum.IMMUNITY)
        return result;
    end

    if (damageType == SkillDamageTypeEnum.PHYSICS) then
        if (FighterStateEnum.is(target, FighterStateEnum.IMMUNITY_PHYSICAL_DAMAGE)) then
            result:setState(DamageResultTypeEnum.IMMUNITY)
            return result;
        end
    end
    if (damageType == SkillDamageTypeEnum.MAGIC) then
        if (FighterStateEnum.is(target, FighterStateEnum.IMMUNITY_MAGIC_DAMAGE)) then
            result:setState(DamageResultTypeEnum.IMMUNITY)
            return result
        end
    end
    if (modifiedRatio <= 0) then
        --策划需求,如果这个值为0, 表示直接清空这些加成系数, 直接用 bonus 固定附加值
        --fight.log("效果伤害计算：额外修正{damage:{},bonus:{}}", bonus, bonus);
        result:setDamage(bonus);
        return result;
    end
    local atk = Formulas.calculateAtkAttr(calculator, target, calculateAttrType, damageType == SkillDamageTypeEnum.HEAL)
    --fight.log("效果伤害计算：攻击值{atk:{}}", atk);
    if (atk <= 0) then
        --fight.log("效果伤害计算：额外修正{damage:{},bonus:{}}", bonus, bonus);
        result:setDamage(bonus)
        return result;
    end

    local def = FighterAttributeManager.getFightAttr(target, FighterAttributeEnum.DEF);
    local ignoreDefRatio = FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.IGNORE_DEF);
    def = def - calcRatio(def, math.floor(ignoreDefRatio));
    --fight.log("效果伤害计算：防御值{def:{}}", def);
    if (def < 0) then
        def = 0;
    end

    --神圣攻击无视防御
    if (damageType == SkillDamageTypeEnum.HOLY) then
        def = 0;
        --fight.log("效果伤害计算：神圣攻击无视防御{def:{}}", def);
    end

    local damage = atk - def;
    --fight.log("效果伤害计算：伤害值{damage:{}}", damage);

    -- 下限修正
    local minAtk = calcRatio(atk, Global.DAMAGE_MIN);
    if (damage < minAtk) then
        damage = minAtk;
        --fight.log("效果伤害计算：下限修正{damage:{}}", damage);
    end

    -- 减伤修正
    local reduceDamageRatio = Formulas.calculateReduceDamageRatio(fighter, target, damageType);
    if (reduceDamageRatio > 0) then
        damage = damage * (1 - Utils.toRatio(reduceDamageRatio))
        --fight.log("效果伤害计算：减伤修正{damage:{},reduceDamageRatio:{}}", damage, reduceDamageRatio);
    end
    -- 暴击修正
    if (not fighter.totalSign.signs[FighterSignEnum.NO_CRIT]) then
        local critDamageRatio = Formulas.calculateCritDamageRatio(fighter, target, damageType);
        if (critDamageRatio > 0) then
            result:setState(DamageResultTypeEnum.CRIT);
            damage = damage * Utils.toRatio(critDamageRatio);
            --fight.log("效果伤害计算：暴击修正{damage:{},critDamageRatio:{}}", damage, critDamageRatio);
        end
    end
    -- 等级压制修正
    local levelSuppressRatio = Formulas.calculateLevelSuppressRatio(fighter, target);
    if (levelSuppressRatio > 0) then
        damage = damage * levelSuppressRatio;
        --fight.log("效果伤害计算：等级压制修正{damage:{},levelSuppressRatio:{}}", damage, levelSuppressRatio);
    end
    -- 比例修正
    --        if (modifiedRatio > 0) { 策划需求,如果这个值为0, 表示直接清空这些加成系数, 直接用 bonus 固定附加值
    damage = damage * Utils.toRatio(modifiedRatio);
    --fight.log("效果伤害计算：比例修正{damage:{},modifiedRatio:{}}", damage, modifiedRatio);
    --        }

    -- 额外修正
    if (bonus > 0) then
        damage = damage + bonus;
        --fight.log("效果伤害计算：额外修正{damage:{},bonus:{}}", damage, bonus);
    end
    local MIN_DAMAGE_FLOAT = math.floor(FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.MIN_DAMAGE_FLOAT))
    local MAX_DAMAGE_FLOAT = math.floor(FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.MAX_DAMAGE_FLOAT))
    if (MIN_DAMAGE_FLOAT == MAX_DAMAGE_FLOAT) then
        result:setDamage(math.floor(damage))
        return result;
    end
    if (MAX_DAMAGE_FLOAT < MIN_DAMAGE_FLOAT) then
        local tempMin = MIN_DAMAGE_FLOAT;
        MIN_DAMAGE_FLOAT = MAX_DAMAGE_FLOAT;
        MAX_DAMAGE_FLOAT = tempMin;
    end
    local randomDAMAGE_FLOAT = math.random(MIN_DAMAGE_FLOAT, MAX_DAMAGE_FLOAT + 1);
    damage = damage * MathUtil.toRatio(randomDAMAGE_FLOAT);
    damage = this.shiAdjust(damage, fighter, target);
    result:setDamage(math.floor(damage))
    return result;
end
---计算效果治疗
---@param buff FighterBuff
---@param calculator Fighter
function this.calculateEffectHeal(buff, calculator, calculateAttrType, modifiedRatio, bonus)
    local fighter = buff.source
    local target = buff.target
    local fight = fighter.fight

    if FighterStateEnum.is(target, FighterStateEnum.BAN_HEAL) then
        --fight.log("效果治疗计算：禁疗");
        return 0;
    end
    --fight.log("效果治疗计算：开始{calculateAttrType:{},modifiedRatio:{}},{}---vs---{}", calculateAttrType, modifiedRatio, fighter:printAttr(), target:printAttr());

    local atk = Formulas.calculateAtkAttr(calculator, target, calculateAttrType, true);
    --fight.log("效果治疗计算：攻击值{atk:{}}", atk);
    if (atk <= 0) then
        return 0;
    end
    -- 治疗系数修正
    local cure = FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.CURE);
    local curePer = FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.CURE_PER);

    local heal = atk * cure * Utils.toRatio(curePer);
    --fight.log("效果治疗计算：治疗值{heal:{}}", heal);

    -- 比例修正
    if (modifiedRatio > 0) then
        heal = heal * Utils.toRatio(modifiedRatio);
        --fight.log("效果治疗计算：比例修正{heal:{},modifiedRatio:{}}", heal, modifiedRatio);
    end
    -- 额外修正
    if (bonus > 0) then
        heal = heal + bonus;
        --fight.log("效果治疗计算：额外修正{heal:{},bonus:{}}", heal, bonus);
    end
    local cureEffect = FighterAttributeManager.getFightAttr(target, FighterAttributeEnum.CURE_EFFECT);
    --fight.log("效果治疗计算：治疗效果{heal:{},cureEffect:{}}", heal, cureEffect);
    if (cureEffect < -10000) then
        cureEffect = -10000;
    end
    local cureEffectAdd = heal * cureEffect / 10000;
    heal = heal + cureEffectAdd;
    return math.floor(heal)
end
function this.isDamage(damageResult)
    if (damageResult == DamageResultTypeEnum.NORMAL) then
        return true;
    end
    if (damageResult == DamageResultTypeEnum.CRIT) then
        return true;
    end
    return false;
end
--[[获取攻击分范围形状 (矩形)]]
---@param fighter Fighter
---@param skill FightSkill
---@return Rectangle2
function this.getAttackShape(fighter, skill)
    if skill:getAttackShape() == nil then
        return nil
    end
    local rangePer = FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.ATTACK_RANGE_PER);
    if (rangePer == 0) then
        return skill:getAttackShape();
    else
        local rectangle2 = Rectangle2.New()
        local newLength = (skill.getAttackShape().length * (1 + Utils.toRatioF(rangePer)))
        local newWidth = (skill.getAttackShape().width * (1 + Utils.toRatioF(rangePer)))
        rectangle2.length = newLength
        rectangle2.width = newWidth
        return rectangle2
    end
end
--[[获取攻击范围形状 (圆形)]]
---@param fighter Fighter
---@param skill FightSkill
function this.getAttackRadius(fighter, skill)
    local rangePer = FighterAttributeManager.getFightAttr(fighter, FighterAttributeEnum.ATTACK_RANGE_PER);
    if (rangePer == 0) then
        return skill.attackRadius
    else
        return skill.attackRadius * (1 + Utils.toRatio(rangePer));
    end
end


--[[
* 攻势 - 守势 对抗修正 调整最后的 伤害值
* @param damage
* @param attacker
* @param defer
* @return
*]]
function this.shiAdjust(damage, attacker, defer)
    local fight = attacker.fight;
    if (not fight:isPVP() or fight.fightType == FightTypeConst.RANK_BATTLE) then
        return damage;
    end
    if (attacker:isSummons()) then
        attacker = attacker.summonsCreater;
    end
    if (defer:isSummons()) then
        defer = defer.summonsCreater;
    end
    local attackShi = getAttackShi(defer);
    local defShi = getDefShi(attacker);
    local attShiValue = FighterAttributeManager.getFightAttr(attacker, attackShi);
    local defShiValue = FighterAttributeManager.getFightAttr(defer, defShi);
    local x = attShiValue - defShiValue;
    local pow = math.pow(1.45, x / 10000);
    damage = damage * pow;
    --fight.log("效果伤害计算：攻守势的修正{damage:{},bonus:{}}", damage, pow);
    return damage;
end

--[[
* 获取对 该职业的 攻势 属性类型
* @param defer
* @return
*/]]
function this.getAttackShi(defer)
    local f_heroType = defer.heroBean.f_HeroType;

    if HeroConst.Hero_Type_QI_SHI == f_heroType then
        return FighterAttributeEnum.ATK_SHI_QI_SHI;
    elseif HeroConst.Hero_Type_YOU_XIA == f_heroType then
        return FighterAttributeEnum.ATK_SHI_YOU_XIA;
    elseif HeroConst.Hero_Type_MO_DAO_SHI == f_heroType then
        return FighterAttributeEnum.ATK_SHI_MO_DAO_SHI;
    elseif HeroConst.Hero_Type_ZHAN_SHI == f_heroType then
        return FighterAttributeEnum.ATK_SHI_ZHAN_SHI;
    elseif HeroConst.Hero_Type_MU_SHI == f_heroType then
        return FighterAttributeEnum.ATK_SHI_MU_SHI;
    elseif HeroConst.Hero_Type_CI_KE == f_heroType then
        return FighterAttributeEnum.ATK_SHI_CI_KE;
    else
        return FighterAttributeEnum.NONE;
    end
end

--[[
* 获取对 该职业的 守势 属性类型
* @param attacker
* @return
*/]]
function this.getDefShi(attacker)
    local f_heroType = attacker.heroBean.f_HeroType;
    if HeroConst.Hero_Type_QI_SHI == f_heroType then
        return FighterAttributeEnum.DEF_SHI_QI_SHI;
    elseif HeroConst.Hero_Type_YOU_XIA == f_heroType then
        return FighterAttributeEnum.DEF_SHI_YOU_XIA;
    elseif HeroConst.Hero_Type_MO_DAO_SHI == f_heroType then
        return FighterAttributeEnum.DEF_SHI_MO_DAO_SHI;
    elseif HeroConst.Hero_Type_ZHAN_SHI == f_heroType then
        return FighterAttributeEnum.DEF_SHI_ZHAN_SHI;
    elseif HeroConst.Hero_Type_MU_SHI == f_heroType then
        return FighterAttributeEnum.DEF_SHI_MU_SHI;
    elseif HeroConst.Hero_Type_CI_KE == f_heroType then

        return FighterAttributeEnum.DEF_SHI_CI_KE;
    else
        return FighterAttributeEnum.NONE;
    end
end